import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Classify from '@/components/Classify'
import User from '@/components/User'
import Pl from '@/components/Pl'
import Reg from '@/components/Reg'
import Login from '@/components/Login'
import Xiaoshou from '@/components/Xiaoshou'
import Detail from '@/components/Detail'
import Buy from '@/components/Buy'
import Peisong from '@/components/Peisong'

Vue.use(Router)

export default new Router({
  routes: [

    {path: '/',name: 'Login',component: Login},
    {path: '/reg',name: 'Reg',component: Reg},

    {
      path: '/main',
      component: Main,
      children: [
        {path: '',redirect:'classify'},
        {path: 'classify',name: 'Classify',component: Classify},
        {path: 'user',name: 'User',component: User},
        {path: 'pl',name: 'Pl',component: Pl},
        {path: 'xiaoshou',name: 'Xiaoshou',component: Xiaoshou},
        {path: 'detail',name: 'Detail',component: Detail},
        {path: 'buy',name: 'Buy',component: Buy},
        {path: 'peisong',name: 'Peisong',component: Peisong},
      ]

    },

  ]
})
